package com.exercise.ThreadAttribute;

public class ThreadNameExample {
    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            System.out.println("Thread is running: " + Thread.currentThread().getName());
        });
        thread.setName("MyThread");
        thread.start();
    }
}
